home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 13 / CU Amiga Magazine's Super CD-ROM 13 (1997)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1997-08].iso / InitCD < prev    next >
AmigaDOS Script File  |  1997-06-20  |  4KB  |  147 lines

  1. .key arg
  2. .bra {
  3. .ket }
  4.  
  5. ; CUCD Init Script
  6. ;
  7. ; Set up assigns etc. both for users booting from the CD and from  HD
  8. ;
  9. ; Version 1.1 - Changed jpegtmp
  10. ;
  11. ; Version 1.2 - Added uninit option
  12. ;
  13. ; Version 1.3 - Added CHECK argument and link to Prefs editor
  14.  
  15. If {arg} EQ "CHECK"         ; Exit if InitCD has been run, otherwise ask
  16.     If $CDInit EQ TRUE
  17.         Skip END
  18.     Else
  19.         set init `RequestChoice "CU Amiga CD" "InitCD needs to be run first*NWould you like to run it now?" "Yes|No"`
  20.         If $init EQ 0
  21.             Skip END
  22.             EndIf
  23.         EndIf
  24.     EndIf
  25.  
  26. if CDBoot EQ TRUE
  27.     C:NoReset
  28.     endif
  29.  
  30. If $CDInit EQ TRUE
  31.     If $CDBoot EQ TRUE          ; don't run UninitCD if booted from CD
  32.         RequestChoice >NIL: "CU Amiga CD" "You do not need to run InitCD*Nwhen you have booted from the CD" "OK"
  33.         Quit
  34.         EndIf
  35.     set remass `RequestChoice "InitCD" "You have already run InitCD once.*NDo you wish to remove the assigns and paths added before?" "Remove|Cancel"`
  36.     If $remass EQ 1
  37.         execute UnInitCD
  38.         EndIf
  39.     Quit
  40.     EndIf
  41.  
  42. Assign CUCD: :
  43.  
  44. ; start arexx if not running
  45. CUCD:rexxc/rx "address command" >NIL:
  46. If WARN
  47.     CUCD:System/RexxMast >NIL:
  48.     EndIf
  49.  
  50. ; Set these assigns and paths only if not booting from CD
  51. IF $CDBoot NOT EQ TRUE
  52.     Run >NIL: RequestChoice "InitCD" "Setting up some assigns and paths to run software from the CD.*NIf you wish to remove the CD from the drive, run InitCD again,*Notherwise the icon will stay on the Workbench." " OK "
  53.     Assign Fonts:   CUCD:Fonts ADD
  54.     Assign Libs:    CUCD:Libs ADD
  55.     Assign L:       CUCD:L ADD
  56.     Assign S:       CUCD:S ADD
  57.     Assign LIBS:    CUCD:Classes ADD
  58.     Path CUCD:C CUCD:System CUCD:System/CDsupport CUCD:Utilities CUCD:S CUCD:Rexxc ADD
  59.     EndIF
  60.  
  61. ; Check that libraries on boot drive are up to date
  62. Execute CUCD:S/UpdateLibrary rexxdossupport.library 3 5
  63. Execute CUCD:S/UpdateLibrary rexxreqtools.library  37 95
  64. Execute CUCD:S/UpdateLibrary newicon.library 39 1
  65. ;Execute CUCD:S/UpdateLibrary cando.library 3 8
  66.  
  67. ; Set some system assigns
  68. Assign WWW:                CUCD:WWW
  69. Assign GM:                 CUCD:System/CDsupport/GMPlay ADD
  70. Assign CUCDNews:           CUCD:CUCD/Online/News
  71.  
  72. ;BEGIN JPEG Codec
  73. Assign JPEGTMP: EXISTS >NIL:
  74. IF WARN
  75.     Assign JPEGTMP: "T:"
  76.     EndIf
  77. ;END JPEG Codec
  78.  
  79. ; Add paths
  80. Path GM: ADD
  81.  
  82. ; Set path to Delitracker Config
  83. If NOT EXISTS ENV:DeliConfig
  84.     SetENV DeliConfig "CUCD:System/CDSupport/DeliTracker/DeliConfig"
  85.     Endif
  86.  
  87. ; Add MUI if no MUI installed.
  88. Assign MUI: EXISTS >NIL:
  89. IF WARN
  90.     Assign MUI:    CUCD:System/MUI
  91.     Assign Libs:   MUI:Libs ADD
  92.     Assign LOCALE: MUI:Locale ADD
  93.     Assign HELP:   MUI:Docs ADD
  94.     EndIf
  95.  
  96. ;Start NewIcons if not already running
  97. If $NoNewIcons NOT EQ TRUE
  98.     CUCD:C/isnirunning
  99.     If NOT WARN
  100.         Run <NIL: >NIL: CUCD:C/NewIcons
  101.         CUCD:C/DefIcons
  102.         EndIf
  103.     EndIf
  104.  
  105. ;BEGIN ClassAct
  106. CUCD:C/CAPrefs >NIL:
  107. ;END ClassAct
  108.  
  109. ; Set assigns and paths for programs on this CD
  110. CUCD:rexxc/rx CUCD:C/MakeAssigns
  111.  
  112. ; Update workbench paths unless running Directory Opus 5.11 or 5.5 in WBR mode
  113. IF $CDBoot NOT EQ TRUE
  114.     Version >NIL: C:LoadWB 43
  115.     If WARN
  116.        LoadWB NEWPATH
  117.     Else
  118.         Version >NIL: C:LoadWB 60
  119.         If NOT WARN
  120.             LoadWB NEWPATH
  121.             EndIf
  122.         EndIf
  123.     EndIf
  124.  
  125. ; Give options for setting CD preferences
  126. If $CDBoot NOT EQ TRUE
  127.     Version >NIL:
  128.     If $Kickstart GT 39
  129.         set edit `RequestChoice "CU Amiga CD" "CUCD now has a preferences program to specify*N the tools used to view/hear different types of files.*NWould you like to run it now?" "Yes|No"`
  130.         If $edit EQ 1
  131.             :RexxC/MuiRexx :S/CUCDPrefs.mrx port CDPREFS
  132.         Else
  133.             RequestChoice >NIL: "CU Amiga CD" "You can run CUCD preferences at any time.*NIt is in the Prefs drawer of the CD" "OK"
  134.             EndIf
  135.     Else
  136.         If NOT EXISTS ENV:IDer.prefs
  137.             Copy >NIL: CUCD:S/IDer.prefs_OS2 ENV:IDer.prefs
  138.             ;RequestChoice >NIL: "CU Amiga CD" "You cannot use the CUCD preferences program with Workbench 2.*NIf you wish to configure the default action for each file type,*Nyou can copy IDer.prefs from the S directory of the CD to*Nyour ENVARC: directoryand edit it as described in*NCUCD:System/CDSupport/IDer/IDer.guide" "OK"
  139.             EndIf
  140.         EndIf
  141.     EndIf
  142.  
  143. SetEnv CDInit TRUE
  144.  
  145. LAB END
  146.  
  147.